import {apiRequestList} from "@/common/axios"
import tool from "@/common/tool.js"
let userMess = tool.getStorage("userMess"), mess = JSON.parse(userMess),{appId,userId} = mess;
console.log(appId,userId)

//台账字段库列表 有案场Id则查询案场台账 无案场ID查询公司台账
export const getStandingBookGetAll = (params={})=>apiRequestList.$post('/dt-business/standingbook/company/getAll',Object.assign(params,{appId:appId}))///standingBook/standingBookGetAll
//获取本案台账（不分页）
export const getStandingBookGetAllBuild = (params={})=>apiRequestList.$post('/dt-business/standingBook/building/standingBookGetAll',Object.assign(params,{appId:appId}))
//获取本案台账（分页）
export const getStandingBookGetAllBuildPages = (params={})=>apiRequestList.$post('/dt-business/standingbook/building/page',Object.assign(params,{appId:appId}))///standingBook/building/standingBookList
//案场台账列表（分组）
export const getstandingBookGetGroup = (params={})=>apiRequestList.$post('/dt-business/standingbook/building/group',Object.assign(params,{appId:appId}))///standingBook/building/standingBookGetGroup
//台账基础字段列表
export const getstandingBookListBase = (params={})=>apiRequestList.$post('/dt-business/standingbook/company/selectList',Object.assign(params,{appId:appId}))///standingBook/standingBookList
//本案台账字段编辑（包括新增  删除  修改）
export const updateStandingBookUpdate = (params={})=>apiRequestList.$post('/dt-business/standingbook/building/edit',Object.assign(params,{appId:appId,operatingId:userId}))///standingBook/building/standingBookUpdate
//台账修改
export const updateStandingBook = (params={})=>apiRequestList.$post('/dt-business/standingbook/company/update',Object.assign(params,{updaterId:userId,appId:appId}))///standingBook/standingBookUpdate
//台账详情
export const detailStandingBook = (params={})=>apiRequestList.$post('/dt-business/standingbook/company/get',Object.assign(params,{appId:appId}))///standingBook/standingBookGet
//台账保存
export const saveStandingBook = (params={})=>apiRequestList.$post('/dt-business/book/save',Object.assign(params,{appId:appId}))
//本案台账排序
export const sortStandingBook = (params={})=>apiRequestList.$post('/dt-business/customerHead/listByBuildingId',Object.assign(params,{appId:appId}))
//本案台账添加
export const addStandingBook = (params={})=>apiRequestList.$post('/dt-business/customerHead/updateZtCustomerHead',Object.assign(params,{appId:appId}))
//获取当前登录人的案场
export const buildByPhone = (params={})=>apiRequestList.$post('/dt-business/team/teams',Object.assign(params,{appId,userId}))
//查询显示端口
export const standingbookShowPort = (params={})=>apiRequestList.$post('/dt-business/standingbook/standingbookShowPort/list',Object.assign(params,{appId,userId}))

